﻿
Partial Class WebForm_ManageEnlistment_QueryWorkTrainingRecord
    Inherits System.Web.UI.UserControl

    Protected Sub btnQuery_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnQuery.Click

        'ObjectDataSource1.SelectParameters.Item("Region").DefaultValue = VolunteerQueryControl1.Region
        'ObjectDataSource1.SelectParameters.Item("Region2").DefaultValue = VolunteerQueryControl1.Region2
        ObjectDataSource1.SelectParameters.Item("VOrganizationID").DefaultValue = VolunteerQueryControl1.VOrganizationID
        ObjectDataSource1.SelectParameters.Item("VolunteerId").DefaultValue = VolunteerQueryControl1.VolunteerId
        ObjectDataSource1.SelectParameters.Item("VolunteerName").DefaultValue = VolunteerQueryControl1.VolunteerName
        ObjectDataSource1.SelectParameters.Item("TEL").DefaultValue = VolunteerQueryControl1.VolunteerTEL
        ObjectDataSource1.SelectParameters.Item("CheckStatus").DefaultValue = ddlCheckStatus.SelectedValue
        ObjectDataSource1.SelectParameters.Item("UOrganizationID").DefaultValue = ddlUOrganizationID.SelectedValue
        ObjectDataSource1.SelectParameters("Annual").DefaultValue = Me.AnnualControl1.Anaual
        ObjectDataSource1.SelectParameters("ItemType").DefaultValue = Me.ddlItemType.SelectedValue

        GridView1.DataSourceID = ObjectDataSource1.ID
        GridView1.DataBind()

    End Sub

    Protected Sub ddlUOrganizationID_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlUOrganizationID.DataBound

        Dim ddlUOrganizationID As DropDownList = TryCast(sender, DropDownList)

        If ddlUOrganizationID.Items.Count > 1 Then

            ddlUOrganizationID.Items.Insert(0, New ListItem(Me.GetLocalResourceObject("PleaseSelect"), String.Empty))

        End If

    End Sub

    Protected Sub ddlCheckStatus_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlCheckStatus.DataBound
        If ddlCheckStatus.Items.Count > 1 Then

            ddlCheckStatus.Items.Insert(0, New ListItem(Me.GetLocalResourceObject("PleaseSelect"), String.Empty))

        End If
    End Sub

    Protected Sub ddlItemType_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlItemType.DataBound
        If Me.ddlItemType.Items.Count > 0 Then
            Me.ddlItemType.Items.Insert(0, New ListItem(Me.GetLocalResourceObject("PleaseSelect"), String.Empty))
        End If
    End Sub
End Class
